package com.xbongbong.sso.model.impl;

import com.xbongbong.sso.domain.dao.OauthCustomParamDao;
import com.xbongbong.sso.domain.entity.OauthCustomParamEntity;
import com.xbongbong.sso.model.OauthCustomParamModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author bomfish
 */
@Service("oauthCustomParamModel")
public class OauthCustomParamModelImpl implements OauthCustomParamModel {
    @Resource
    private OauthCustomParamDao oauthCustomParamDao;

    @Override
    public Long insert(OauthCustomParamEntity entity) {
        return oauthCustomParamDao.insert(entity);
    }

    @Override
    public void insertBatch(List<OauthCustomParamEntity> list) {
        oauthCustomParamDao.insertBatch(list);
    }

    @Override
    public List<OauthCustomParamEntity> findEntities(Map<String, Object> param) {
        return oauthCustomParamDao.findEntities(param);
    }

    @Override
    public Integer getEntityCount(Map<String, Object> param) {
        return oauthCustomParamDao.getEntitiesCount(param);
    }

    @Override
    public void update(OauthCustomParamEntity entity) {
        oauthCustomParamDao.update(entity);
    }

    @Override
    public OauthCustomParamEntity getByKey(Long key, String corpid) {
        return oauthCustomParamDao.getByKey(key, corpid);
    }

    @Override
    public Long delete(Long key, String corpid) {
        return oauthCustomParamDao.deleteByKey(key, corpid);
    }
}
